package com.lucanjun.cn.springboot.multipledatasources.business.model.dto.base;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Min;
import lombok.Data;

import java.io.Serializable;

/**
 * @author lucanjun
 * @version 1.0.0
 * @title PageDto
 * @create 2024-12-19 16:55:19
 * @description 分页查询入参对象
 */
@Data
@Valid
@Schema(name = "PageDto", description = "分页查询入参对象")
public class PageDto implements Serializable {

    private static final long serialVersionUID = 1338245238758581852L;

    @Schema(description = "页码索引", example = "1")
    @Min(value = 1, message = "页码索引不能小于1")
    private Integer pageIndex;

    @Schema(description = "每页个数", example = "10")
    @Min(value = 1, message = "每页个数不能小于1")
    private Integer pageSize;

}
